package com.wlyuan.open.scanner.utils.enums.bill;

import com.wlyuan.core.marker.NamedValue;
import com.wlyuan.core.marker.NamedValueMap;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Map;

/**
 * @author lijing
 * @description 收款状态
 */
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
@Getter
public enum ReceiveFinishEnum implements NamedValue<Integer> {

    FINSHINPAY(0, 0, "未收"),
    NOPAY(1, 1, "已收");

    private final Integer value;
    private final Integer newValue;
    private final String name;

    private static final Map<Integer, ReceiveFinishEnum> MAP = new NamedValueMap<>(ReceiveFinishEnum.class);

    public static ReceiveFinishEnum fromValue(Integer value) {
        return MAP.get(value);
    }
}
